/**
 * Created by lgc on 2017/10/28.
 */
import Vue from 'vue'
import api from './getData'
import axios from '../http'

export const localLogin = function (data) {
  let json =  {"userName":"iview_admin","password":"123"};
  let reason = {"ok":false,data:json};
  return new Promise(function(resolve, reject) {
    if(json.userName==data.userName&&json.password==data.password){
      reason.ok = true;
      resolve(reason);
    }else{
      reject();
    }
  });
}
export const getDataChange = function () {
  let json =  [{"name":"新增跟进1","data":0,"up":"","icon":"ivu-icon-funnel"},
    {"name":"新增跟进2","data":0,"up":"ivu-icon-arrow-up-c","icon":"ivu-icon-bookmark"},
    {"name":"新增跟进3","data":0,"up":"ivu-icon-arrow-down-c","icon":"ivu-icon-email"},
    {"name":"新增跟进4","data":0,"up":"","icon":"ivu-icon-link"},
    {"name":"新增跟进5","data":0,"up":"ivu-icon-arrow-up-c","icon":"ivu-icon-clock"}];
  let reason = {"ok":false,data:json};
  return new Promise(function(resolve, reject) {
      reason.ok = true;
      resolve(reason);
    });
}
export const getRepos = function(params){
  return axios.get(api.repo_list, params)
}
